﻿@{
	var labelName = PageData["labelName"];
	var labelDisplay = PageData["labelDisplay"];
	var inputType = PageData["inputType"];
	var required = PageData["required"];
	var validationClasses = PageData["validationClasses"];
	if (required) {
		validationClasses = "required" + validationClasses;
	}
	var validationAttributes = new HtmlString(PageData["validationAttributes"]);
    var maxLength = PageData["maxLength"];
}
<div class="editor-label">
	<label for="@labelName">@labelDisplay</label>
</div>
<div class="editor-field">
	<input id="@labelName" @if(required){<text>class="@validationClasses"</text>} name="@labelName" @validationAttributes type="@(inputType ?? "text")" @if(maxLength!=null){<text>maxlength="@maxLength"</text>} />
	@if (required) {
		<em>*</em>
	}
</div>